package test1231.test3;

public class JavaProgrammer {
    private JavaLanguage javaLanguage;

    public JavaProgrammer(JavaLanguage javaLanguage) {
        this.javaLanguage = javaLanguage;
    }

    public void add(String name, int age) {
        System.out.println("Java程序员：正在添加数据...");
        javaLanguage.setDb(name, age);
    }

    public void update(int id, String name, int age) {
        System.out.println("Java程序员：正在修改数据...");
        javaLanguage.changeDb(id, name, age);
    }

    public void delete(int id) {
        System.out.println("Java程序员：正在删除数据...");
        javaLanguage.deleteDb(id);
    }
}
